<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('企业档案库')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>关键字：</p>
                                <input type="text" name="keyword"/>
                            </li>
                            <li>
							资质分类：<select name="certTypeNum" th:with="type=${@dict.getType('sys_normal_disable')}">
							            <option value="">全部</option>
										<option value="工程勘察企业资质">工程勘察企业资质</option>
										<option value="工程设计企业资质">工程设计企业资质</option>
										<option value="建筑业企业资质">建筑业企业资质</option>
										<option value="工程监理企业资质">工程监理企业资质</option>
										<option value="工程造价咨询企业资质">工程造价咨询企业资质</option>
										<option value="工程招标代理机构资质">工程招标代理机构资质</option>
										<option value="建筑设计施工一体化资质">建筑设计施工一体化资质</option>
										<option value="检测机构资质">检测机构资质</option>
										<option value="房地产开发企业资质">房地产开发企业资质</option>
										<option value="房地产估价机构资质">房地产估价机构资质</option>
										<option value="城镇房屋拆迁单位资质">城镇房屋拆迁单位资质</option>
										<option value="物业服务企业资质">物业服务企业资质</option>
										<option value="城市燃气企业资质">城市燃气企业资质</option>
										<option value="城市园林绿化企业资质">城市园林绿化企业资质</option>
										<option value="施工图设计文件审查机构资格">施工图设计文件审查机构资格</option>
										<option value="城乡规划编制资质">城乡规划编制资质</option>
										<option value="起重机械检测机构">起重机械检测机构</option>
								   </select>
							</li>
							<li class="select-time">
                                <p>建档时间：</p>
                                <input type="text" class="time-input" id="startTime1" placeholder="开始时间" name="beginPubDate"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime1" placeholder="结束时间" name="endPubDate"/>
                            </li> 
                            <li>
							省份：<select name="isInOut" th:with="type=${@dict.getType('sys_normal_disable')}">
							            <option value="">全部</option>
										<option value="0">省内</option>
										<option value="1">省外</option>
								   </select>
							</li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
    var detailFlag = [[${@permission.hasAnyPermi('enterprise:enterpriseAll:basicinfo,enterprise:enterpriseAll:qua,enterprise:enterpriseAll:cxpj,enterprise:enterpriseAll:yjlist,person:personall:list,integrityInformation:enterprisesGoodBehavior:list,integrityInformation:enterprisesBadBehavior:list')}]];
    var quaFlag = [[${@permission.hasPermi('enterprise:enterpriseAll:qua')}]];
    
    var prefix = ctx + "enterprise/enterprise";
    
    $(function() {
    	 var options = {
    			url: prefix + "/list",
                updateUrl: prefix + "/edit/{id}",
                exportUrl: prefix + "/export",
                detailUrl: prefix + "/detail/{id}",
                detailQuaUrl: prefix + "/detailQua/{id}",
                modalName: "企业档案库",
                columns: [{
                        field: 'id',
                        title: '序号',
						formatter: function (value, row, index) {
						
						    return index + 1;
						}
                    },
                    {
                        field: 'guid',
                        title: '企业ID',
						visible: false
	                },
                    {
                        field: 'companyName',
                        title: '企业名称'
	                }, 
					{
                        field: 'regProvinceCity',
                        title: '注册地'
                    },
					{
	                    field: 'opera',
	                    title: '资质内容(点击查看)',
                        formatter: function (value, row, index) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs ' + quaFlag + '" href="javascript:void(0)" onclick="$.operate.detailQua(\'' + "企业资质" + '\',\'' + row.guid + '\')"><i class="fa fa-edit"></i>资质</a> ');
                            return actions.join('');
	                       }
	                }, 
					{
                        field: 'regProvinceNum',
                        title: '注册所在省',
						visible: false
                    }, 
					{
                        field: 'regCityNum',
                        title: '注册所在地',
						visible: false
                    },
                    {
                        field: 'linkMan',
                        title: '联系人'
                    },
                    {
                        field: 'linkPhone',
                        title: '联系电话'
                    },
                    {
                        field: 'address',
                        title: '营业地址'
                    },
					{
	                    field: 'opera',
	                    title: '功能区',
                        formatter: function (value, row, index) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailQYTabRewrite(\'' + row.guid + '\',\''+ row.companyName +'\')"><i class="fa fa-edit"></i>详情</a> ');
                            return actions.join('');
	                       }
	                }]
        };
    	$.table.init(options);
    });
    </script>
</body>
</html>